<?php
return [
    'service_manager' => [
        'factories' => [
            \ApigilityGroup\V1\Rest\Setting\SettingResource::class => \ApigilityGroup\V1\Rest\Setting\SettingResourceFactory::class,
            \ApigilityGroup\V1\Rest\Group\GroupResource::class => \ApigilityGroup\V1\Rest\Group\GroupResourceFactory::class,
            \ApigilityGroup\V1\Rest\ParticipationDetail\ParticipationDetailResource::class => \ApigilityGroup\V1\Rest\ParticipationDetail\ParticipationDetailResourceFactory::class,
        ],
    ],
    'router' => [
        'routes' => [
            'apigility-group.rest.setting' => [
                'type' => 'Segment',
                'options' => [
                    'route' => '/group/setting[/:setting_id]',
                    'defaults' => [
                        'controller' => 'ApigilityGroup\\V1\\Rest\\Setting\\Controller',
                    ],
                ],
            ],
            'apigility-group.rest.group' => [
                'type' => 'Segment',
                'options' => [
                    'route' => '/group/group[/:group_id]',
                    'defaults' => [
                        'controller' => 'ApigilityGroup\\V1\\Rest\\Group\\Controller',
                    ],
                ],
            ],
            'apigility-group.rest.participation-detail' => [
                'type' => 'Segment',
                'options' => [
                    'route' => '/group/participation-detail[/:participation_detail_id]',
                    'defaults' => [
                        'controller' => 'ApigilityGroup\\V1\\Rest\\ParticipationDetail\\Controller',
                    ],
                ],
            ],
        ],
    ],
    'zf-versioning' => [
        'uri' => [
            0 => 'apigility-group.rest.setting',
            1 => 'apigility-group.rest.group',
            2 => 'apigility-group.rest.participation-detail',
        ],
    ],
    'zf-rest' => [
        'ApigilityGroup\\V1\\Rest\\Setting\\Controller' => [
            'listener' => \ApigilityGroup\V1\Rest\Setting\SettingResource::class,
            'route_name' => 'apigility-group.rest.setting',
            'route_identifier_name' => 'setting_id',
            'collection_name' => 'setting',
            'entity_http_methods' => [
                0 => 'GET',
                1 => 'DELETE',
                2 => 'PATCH',
                3 => 'POST',
            ],
            'collection_http_methods' => [
                0 => 'GET',
                1 => 'POST',
            ],
            'collection_query_whitelist' => [
                0 => 'province_region_id',
                1 => 'city_region_id',
                2 => 'district_region_id',
                3 => 'user_id',
                4 => 'is_statistics',
            ],
            'page_size' => 25,
            'page_size_param' => '25',
            'entity_class' => \ApigilityGroup\V1\Rest\Setting\SettingEntity::class,
            'collection_class' => \ApigilityGroup\V1\Rest\Setting\SettingCollection::class,
            'service_name' => 'Setting',
        ],
        'ApigilityGroup\\V1\\Rest\\Group\\Controller' => [
            'listener' => \ApigilityGroup\V1\Rest\Group\GroupResource::class,
            'route_name' => 'apigility-group.rest.group',
            'route_identifier_name' => 'group_id',
            'collection_name' => 'group',
            'entity_http_methods' => [
                0 => 'GET',
            ],
            'collection_http_methods' => [
                0 => 'GET',
                1 => 'POST',
            ],
            'collection_query_whitelist' => [
                0 => 'user_id',
            ],
            'page_size' => 25,
            'page_size_param' => null,
            'entity_class' => \ApigilityGroup\V1\Rest\Group\GroupEntity::class,
            'collection_class' => \ApigilityGroup\V1\Rest\Group\GroupCollection::class,
            'service_name' => 'Group',
        ],
        'ApigilityGroup\\V1\\Rest\\ParticipationDetail\\Controller' => [
            'listener' => \ApigilityGroup\V1\Rest\ParticipationDetail\ParticipationDetailResource::class,
            'route_name' => 'apigility-group.rest.participation-detail',
            'route_identifier_name' => 'participation_detail_id',
            'collection_name' => 'participation_detail',
            'entity_http_methods' => [
                0 => 'GET',
            ],
            'collection_http_methods' => [
                0 => 'GET',
                1 => 'POST',
            ],
            'collection_query_whitelist' => [
                0 => 'group_id',
                1 => 'user_id',
            ],
            'page_size' => 25,
            'page_size_param' => null,
            'entity_class' => \ApigilityGroup\V1\Rest\ParticipationDetail\ParticipationDetailEntity::class,
            'collection_class' => \ApigilityGroup\V1\Rest\ParticipationDetail\ParticipationDetailCollection::class,
            'service_name' => 'ParticipationDetail',
        ],
    ],
    'zf-content-negotiation' => [
        'controllers' => [
            'ApigilityGroup\\V1\\Rest\\Setting\\Controller' => 'HalJson',
            'ApigilityGroup\\V1\\Rest\\Group\\Controller' => 'HalJson',
            'ApigilityGroup\\V1\\Rest\\ParticipationDetail\\Controller' => 'HalJson',
        ],
        'accept_whitelist' => [
            'ApigilityGroup\\V1\\Rest\\Setting\\Controller' => [
                0 => 'application/vnd.apigility-group.v1+json',
                1 => 'application/hal+json',
                2 => 'application/json',
            ],
            'ApigilityGroup\\V1\\Rest\\Group\\Controller' => [
                0 => 'application/vnd.apigility-group.v1+json',
                1 => 'application/hal+json',
                2 => 'application/json',
            ],
            'ApigilityGroup\\V1\\Rest\\ParticipationDetail\\Controller' => [
                0 => 'application/vnd.apigility-group.v1+json',
                1 => 'application/hal+json',
                2 => 'application/json',
            ],
        ],
        'content_type_whitelist' => [
            'ApigilityGroup\\V1\\Rest\\Setting\\Controller' => [
                0 => 'application/vnd.apigility-group.v1+json',
                1 => 'application/json',
            ],
            'ApigilityGroup\\V1\\Rest\\Group\\Controller' => [
                0 => 'application/vnd.apigility-group.v1+json',
                1 => 'application/json',
            ],
            'ApigilityGroup\\V1\\Rest\\ParticipationDetail\\Controller' => [
                0 => 'application/vnd.apigility-group.v1+json',
                1 => 'application/json',
            ],
        ],
    ],
    'zf-hal' => [
        'metadata_map' => [
            \ApigilityGroup\V1\Rest\Setting\SettingEntity::class => [
                'entity_identifier_name' => 'id',
                'route_name' => 'apigility-group.rest.setting',
                'route_identifier_name' => 'setting_id',
                'hydrator' => \Zend\Hydrator\ClassMethods::class,
            ],
            \ApigilityGroup\V1\Rest\Setting\SettingCollection::class => [
                'entity_identifier_name' => 'id',
                'route_name' => 'apigility-group.rest.setting',
                'route_identifier_name' => 'setting_id',
                'is_collection' => true,
            ],
            \ApigilityGroup\V1\Rest\Group\GroupEntity::class => [
                'entity_identifier_name' => 'id',
                'route_name' => 'apigility-group.rest.group',
                'route_identifier_name' => 'group_id',
                'hydrator' => \Zend\Hydrator\ClassMethods::class,
            ],
            \ApigilityGroup\V1\Rest\Group\GroupCollection::class => [
                'entity_identifier_name' => 'id',
                'route_name' => 'apigility-group.rest.group',
                'route_identifier_name' => 'group_id',
                'is_collection' => true,
            ],
            \ApigilityGroup\V1\Rest\ParticipationDetail\ParticipationDetailEntity::class => [
                'entity_identifier_name' => 'id',
                'route_name' => 'apigility-group.rest.participation-detail',
                'route_identifier_name' => 'participation_detail_id',
                'hydrator' => \Zend\Hydrator\ClassMethods::class,
            ],
            \ApigilityGroup\V1\Rest\ParticipationDetail\ParticipationDetailCollection::class => [
                'entity_identifier_name' => 'id',
                'route_name' => 'apigility-group.rest.participation-detail',
                'route_identifier_name' => 'participation_detail_id',
                'is_collection' => true,
            ],
        ],
    ],
    'zf-mvc-auth' => [
        'authorization' => [
            'ApigilityGroup\\V1\\Rest\\Group\\Controller' => [
                'collection' => [
                    'GET' => false,
                    'POST' => true,
                    'PUT' => false,
                    'PATCH' => false,
                    'DELETE' => false,
                ],
                'entity' => [
                    'GET' => false,
                    'POST' => false,
                    'PUT' => false,
                    'PATCH' => false,
                    'DELETE' => false,
                ],
            ],
        ],
    ],
];
